#include "nWid.h"
#include "nWidplugin.h"

#include <QtPlugin>

nWidPlugin::nWidPlugin(QObject *parent)
    : QObject(parent)
{
    m_initialized = false;
}

void nWidPlugin::initialize(QDesignerFormEditorInterface * /* core */)
{
    if (m_initialized)
        return;

    // Add extension registrations, etc. here

    m_initialized = true;
}

bool nWidPlugin::isInitialized() const
{
    return m_initialized;
}

QWidget *nWidPlugin::createWidget(QWidget *parent)
{
    return new nWid(parent);
}

QString nWidPlugin::name() const
{
    return QLatin1String("nWid");
}

QString nWidPlugin::group() const
{
    return QLatin1String("");
}

QIcon nWidPlugin::icon() const
{
    return QIcon();
}

QString nWidPlugin::toolTip() const
{
    return QLatin1String("");
}

QString nWidPlugin::whatsThis() const
{
    return QLatin1String("");
}

bool nWidPlugin::isContainer() const
{
    return false;
}

QString nWidPlugin::domXml() const
{
    return QLatin1String("<widget class=\"nWid\" name=\"nWid\">\n</widget>\n");
}

QString nWidPlugin::includeFile() const
{
    return QLatin1String("nWid.h");
}
#if QT_VERSION < 0x050000
Q_EXPORT_PLUGIN2(nwidplugin, nWidPlugin)
#endif // QT_VERSION < 0x050000
